package com.admin.controller;

import com.common.domain.dto.ExchangeLogDto;
import com.common.domain.entity.Point;
import com.common.domain.entity.ResponseResult;
import com.common.domain.entity.RoleRequest;
import com.common.service.ExchangeLogService;
import com.common.service.PointService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("system/exchange")
public class ExchangeController {
  @Autowired
  private ExchangeLogService exchangeLogService;

    @PostMapping("list")
    public ResponseResult allExchangeList(@RequestBody ExchangeLogDto exchangeLogDto){
        return exchangeLogService.allExchangeList(exchangeLogDto);
    }

    @DeleteMapping("{ids}")
    public ResponseResult deleteExchange(@PathVariable String ids){
        return exchangeLogService.deleteExchange(ids);
    }

    @GetMapping("changeStatus")
    public ResponseResult changeStatus(Long exchangeId, String status){
        return exchangeLogService.changeStatus(exchangeId, status);
    }

}
